name: Check dot1x interface status on switch01
testcases:
- name: check_dot1x_int_status_on_switch01
  steps:
  - type: http
    method: POST
    basic_auth_user: "{{.switch01.api.user}}"
    basic_auth_password: "{{.switch01.api.password}}"
    url: '{{.switch01.api.url}}/nclu/v1/rpc'
    ignore_verify_ssl: true
    body: >-
      {
       "cmd": "show dot1x interface {{.switch01.dot1x_interface.id}} json"
      }
    headers:
      "Content-Type": "application/json"
    assertions:
      # we didn't check MAC address on port to make this testcase reusable
      - result.body ShouldContainSubstring "{{.wired_dot1x_eap_tls_manual.roles.dot1x_eap_tls.vlan_id}}"
      - result.body ShouldContainSubstring TLS
      - result.body ShouldContainSubstring AUTHORIZED
      - result.statuscode ShouldEqual 200
